package ru.pb.game.network.engine.client.packets.receivable;

import ru.pb.game.network.engine.client.packets.FromClientToGameServerPacket;
import ru.pb.game.network.engine.client.packets.sendable.PROTOCOL_ROOM_HOST_CHANGE_TEAM_ACK;
import ru.pb.game.objects.model.players.Player;

public class PROTOCOL_ROOM_HOST_CHANGE_TEAM_REQ extends FromClientToGameServerPacket
{
	private int _frost;

	@Override
	public void readImpl()
	{
		_frost = readH();
		// _log.info("frost: " + _frost);
	}

	@Override
	public void runImpl()
	{
		Player p = getPlayer();
		if(p != null && p.isRoomLeader())
		{
			p.sendPacket(new PROTOCOL_ROOM_HOST_CHANGE_TEAM_ACK(p));
		}
	}
}